<%#
kind: job_template
name: Restart Services - Katello SSH Default
job_category: Katello
description_format: 'Restart Services'
feature: katello_service_restart
provider_type: SSH
template_inputs:
- name: helper
  description: A comma separated list of commands to run to restart services
  input_type: user
  required: true
%>

<%
commands = input(:helper).split(',').map { |split| split.strip }
reboot = commands.delete('reboot')
-%>
<%= commands.join("\n") %>
katello-tracer-upload
<% if reboot -%>
<%= render_template('Power Action - SSH Default', action: 'restart') %>
<% end %>
